package is.glif.fenius.translators.idc;

import net.es.oscars.client.improved.list.ListClient;
import net.es.oscars.client.improved.list.ListConsoleOutputter;
import net.es.oscars.client.improved.ClientException;
import net.es.oscars.wsdlTypes.ListReply;
import net.es.oscars.wsdlTypes.ResDetails;

public class IDCTester {
    private static IDCTester instance;
    public static IDCTester getInstance() {
        if (instance == null) {
            instance = new IDCTester();
        }
        return instance;
    }
    private IDCTester() {
    }
    
    public void runTests() {
        this.sendList();
    }
    
    private void sendList() {
        ListClient cl = new ListClient();
        ResDetails[] resvs = null;
        cl.configureSoap();
        cl.configure();
        ListReply listResp;
        try {
            listResp = cl.performRequest(cl.formRequest());
            resvs = cl.filterResvs(listResp.getResDetails());
            ListConsoleOutputter out = new ListConsoleOutputter();
            out.output(resvs);
        } catch (ClientException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    
    
}
